<template>
	<view class="timelineItem">
		<view class="timeItem">
			<view class="leftTime">
				<view class="narmsda">
					{{leftTime[2]}}
				</view>
				<view class="liansda"></view>
				<view class="asda_li">
					<view class="asdasd">
						{{leftTime[1]}}月 
					</view>
					<view class="asdasds">
						{{leftTime[0]}}
					</view>
				</view>
			</view>
			<view class="line">
				<view class="out" :style="{background: color == '' ? '' : color}">
					<view class="inner" :style="{background: color == '' ? '' : color}"></view>
				</view>
			</view>
			<view class="rightContent">
				<slot></slot>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		props:{
			leftTime:{
				type:Array,
				default:''
			},
			color:{
				type:String,
				default:''
			}
		},
		data(){
			return {
				
			}
		}
	}
</script>

<style scoped lang="less">
	.timelineItem {
		margin-top: 20rpx;
		.timeItem {
			display: flex;
			.leftTime {
				margin-left: 20rpx;
				display: flex;
				flex-direction: row;
				justify-content: center;
				align-items: flex-start;
				.narmsda{
					font-size: 40rpx;
					font-weight: bold;
					color: #08112C;
				}
				.liansda{
					width: 1rpx;
					height: 36rpx;
					background: #DEE2EB;
					margin-left: 8rpx;
					margin-top: 8rpx;
				}
				.asda_li{
					display: flex;
					flex-direction: column;
					justify-content: flex-start;
					align-items: flex-start;
					margin-left: 9rpx;
					margin-right: 20rpx;
					.asdasd{
						font-size: 20rpx;
						font-weight: bold;
						color: #485A75;
					}
					.asdasds{
						font-size: 20rpx;
						font-weight: bold;
						color: #485A75;
					}
				}
			}
			.line {
				width: 2rpx;
				background:rgba(204,204,204,1);
				position: relative;
				.out {
					position: absolute;
					top: 0;
					left: 50%;
					transform: translateX(-50%);
					display: flex;
					justify-content: center;
					align-items: center;
					
					width: 14rpx;
					height: 14rpx;
					background :  #F94141;
					border-radius: 50%;
					.inner {
						
						width: 14rpx;
						height: 14rpx;
						background : #F94141;
						border-radius: 50%;
					}
				}
			}
			.rightContent {
				flex: 1;
				padding: 0 10rpx 40rpx;
				margin-left: 20rpx;
				min-height: 50rpx;
			}
		}
	}
</style>
